#ifndef COMMUNICATIONSTRUCTS_H_
#define COMMUNICATIONSTRUCTS_H_
#include "SnakeSegment.h"
#include "PlayerMoves.h"

#define PLAYERS_MAX_AMOUNT 5
#define STATE_GAME_PLAYERS_REGISTRATION -1
#define STATE_GAME_STOP 0
#define STATE_GAME_STARTED 1

typedef struct{
	int passwd;
	char nick[16];
	Direction d;
}ClientComunicationStruct;


typedef struct
{
	int game_number;/* number of games in a row*/
	int game_started;
	int server_round_number;
	int current_players_number;
	int player_active_state[PLAYERS_MAX_AMOUNT];
	int player_wins[PLAYERS_MAX_AMOUNT];
	Direction last_client_direction[PLAYERS_MAX_AMOUNT];// direction that was sent from client(not saved immediately in player_moves
	PlayerMoves player_moves[PLAYERS_MAX_AMOUNT];
} SharedMemStruct;
#endif /*COMMUNICATIONSTRUCTS_H_*/
